package org.lg.entity;

import java.util.ArrayList;
import java.util.List;

public class CommentExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public CommentExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCmidIsNull() {
            addCriterion("cmid is null");
            return (Criteria) this;
        }

        public Criteria andCmidIsNotNull() {
            addCriterion("cmid is not null");
            return (Criteria) this;
        }

        public Criteria andCmidEqualTo(Integer value) {
            addCriterion("cmid =", value, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidNotEqualTo(Integer value) {
            addCriterion("cmid <>", value, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidGreaterThan(Integer value) {
            addCriterion("cmid >", value, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidGreaterThanOrEqualTo(Integer value) {
            addCriterion("cmid >=", value, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidLessThan(Integer value) {
            addCriterion("cmid <", value, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidLessThanOrEqualTo(Integer value) {
            addCriterion("cmid <=", value, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidIn(List<Integer> values) {
            addCriterion("cmid in", values, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidNotIn(List<Integer> values) {
            addCriterion("cmid not in", values, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidBetween(Integer value1, Integer value2) {
            addCriterion("cmid between", value1, value2, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmidNotBetween(Integer value1, Integer value2) {
            addCriterion("cmid not between", value1, value2, "cmid");
            return (Criteria) this;
        }

        public Criteria andCmnameIsNull() {
            addCriterion("cmname is null");
            return (Criteria) this;
        }

        public Criteria andCmnameIsNotNull() {
            addCriterion("cmname is not null");
            return (Criteria) this;
        }

        public Criteria andCmnameEqualTo(String value) {
            addCriterion("cmname =", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameNotEqualTo(String value) {
            addCriterion("cmname <>", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameGreaterThan(String value) {
            addCriterion("cmname >", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameGreaterThanOrEqualTo(String value) {
            addCriterion("cmname >=", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameLessThan(String value) {
            addCriterion("cmname <", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameLessThanOrEqualTo(String value) {
            addCriterion("cmname <=", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameLike(String value) {
            addCriterion("cmname like", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameNotLike(String value) {
            addCriterion("cmname not like", value, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameIn(List<String> values) {
            addCriterion("cmname in", values, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameNotIn(List<String> values) {
            addCriterion("cmname not in", values, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameBetween(String value1, String value2) {
            addCriterion("cmname between", value1, value2, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmnameNotBetween(String value1, String value2) {
            addCriterion("cmname not between", value1, value2, "cmname");
            return (Criteria) this;
        }

        public Criteria andCmlevelIsNull() {
            addCriterion("cmlevel is null");
            return (Criteria) this;
        }

        public Criteria andCmlevelIsNotNull() {
            addCriterion("cmlevel is not null");
            return (Criteria) this;
        }

        public Criteria andCmlevelEqualTo(Integer value) {
            addCriterion("cmlevel =", value, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelNotEqualTo(Integer value) {
            addCriterion("cmlevel <>", value, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelGreaterThan(Integer value) {
            addCriterion("cmlevel >", value, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelGreaterThanOrEqualTo(Integer value) {
            addCriterion("cmlevel >=", value, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelLessThan(Integer value) {
            addCriterion("cmlevel <", value, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelLessThanOrEqualTo(Integer value) {
            addCriterion("cmlevel <=", value, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelIn(List<Integer> values) {
            addCriterion("cmlevel in", values, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelNotIn(List<Integer> values) {
            addCriterion("cmlevel not in", values, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelBetween(Integer value1, Integer value2) {
            addCriterion("cmlevel between", value1, value2, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmlevelNotBetween(Integer value1, Integer value2) {
            addCriterion("cmlevel not between", value1, value2, "cmlevel");
            return (Criteria) this;
        }

        public Criteria andCmpidIsNull() {
            addCriterion("cmpid is null");
            return (Criteria) this;
        }

        public Criteria andCmpidIsNotNull() {
            addCriterion("cmpid is not null");
            return (Criteria) this;
        }

        public Criteria andCmpidEqualTo(Integer value) {
            addCriterion("cmpid =", value, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidNotEqualTo(Integer value) {
            addCriterion("cmpid <>", value, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidGreaterThan(Integer value) {
            addCriterion("cmpid >", value, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidGreaterThanOrEqualTo(Integer value) {
            addCriterion("cmpid >=", value, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidLessThan(Integer value) {
            addCriterion("cmpid <", value, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidLessThanOrEqualTo(Integer value) {
            addCriterion("cmpid <=", value, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidIn(List<Integer> values) {
            addCriterion("cmpid in", values, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidNotIn(List<Integer> values) {
            addCriterion("cmpid not in", values, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidBetween(Integer value1, Integer value2) {
            addCriterion("cmpid between", value1, value2, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmpidNotBetween(Integer value1, Integer value2) {
            addCriterion("cmpid not between", value1, value2, "cmpid");
            return (Criteria) this;
        }

        public Criteria andCmvalIsNull() {
            addCriterion("cmval is null");
            return (Criteria) this;
        }

        public Criteria andCmvalIsNotNull() {
            addCriterion("cmval is not null");
            return (Criteria) this;
        }

        public Criteria andCmvalEqualTo(Integer value) {
            addCriterion("cmval =", value, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalNotEqualTo(Integer value) {
            addCriterion("cmval <>", value, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalGreaterThan(Integer value) {
            addCriterion("cmval >", value, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalGreaterThanOrEqualTo(Integer value) {
            addCriterion("cmval >=", value, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalLessThan(Integer value) {
            addCriterion("cmval <", value, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalLessThanOrEqualTo(Integer value) {
            addCriterion("cmval <=", value, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalIn(List<Integer> values) {
            addCriterion("cmval in", values, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalNotIn(List<Integer> values) {
            addCriterion("cmval not in", values, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalBetween(Integer value1, Integer value2) {
            addCriterion("cmval between", value1, value2, "cmval");
            return (Criteria) this;
        }

        public Criteria andCmvalNotBetween(Integer value1, Integer value2) {
            addCriterion("cmval not between", value1, value2, "cmval");
            return (Criteria) this;
        }

        public Criteria andCcontentIsNull() {
            addCriterion("ccontent is null");
            return (Criteria) this;
        }

        public Criteria andCcontentIsNotNull() {
            addCriterion("ccontent is not null");
            return (Criteria) this;
        }

        public Criteria andCcontentEqualTo(String value) {
            addCriterion("ccontent =", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentNotEqualTo(String value) {
            addCriterion("ccontent <>", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentGreaterThan(String value) {
            addCriterion("ccontent >", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentGreaterThanOrEqualTo(String value) {
            addCriterion("ccontent >=", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentLessThan(String value) {
            addCriterion("ccontent <", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentLessThanOrEqualTo(String value) {
            addCriterion("ccontent <=", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentLike(String value) {
            addCriterion("ccontent like", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentNotLike(String value) {
            addCriterion("ccontent not like", value, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentIn(List<String> values) {
            addCriterion("ccontent in", values, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentNotIn(List<String> values) {
            addCriterion("ccontent not in", values, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentBetween(String value1, String value2) {
            addCriterion("ccontent between", value1, value2, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCcontentNotBetween(String value1, String value2) {
            addCriterion("ccontent not between", value1, value2, "ccontent");
            return (Criteria) this;
        }

        public Criteria andCdetailIsNull() {
            addCriterion("cdetail is null");
            return (Criteria) this;
        }

        public Criteria andCdetailIsNotNull() {
            addCriterion("cdetail is not null");
            return (Criteria) this;
        }

        public Criteria andCdetailEqualTo(String value) {
            addCriterion("cdetail =", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailNotEqualTo(String value) {
            addCriterion("cdetail <>", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailGreaterThan(String value) {
            addCriterion("cdetail >", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailGreaterThanOrEqualTo(String value) {
            addCriterion("cdetail >=", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailLessThan(String value) {
            addCriterion("cdetail <", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailLessThanOrEqualTo(String value) {
            addCriterion("cdetail <=", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailLike(String value) {
            addCriterion("cdetail like", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailNotLike(String value) {
            addCriterion("cdetail not like", value, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailIn(List<String> values) {
            addCriterion("cdetail in", values, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailNotIn(List<String> values) {
            addCriterion("cdetail not in", values, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailBetween(String value1, String value2) {
            addCriterion("cdetail between", value1, value2, "cdetail");
            return (Criteria) this;
        }

        public Criteria andCdetailNotBetween(String value1, String value2) {
            addCriterion("cdetail not between", value1, value2, "cdetail");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}